<script type="text/javascript">
    $(function(){
        $('#preserve').ajaxForm({
            beforeSubmit: checkForm, 
            success: complete, 
            dataType: 'json'
        });

        function checkForm(){
            
        }
        function complete(data){
            if(data.code == 1){
                alert_msg.success(data.msg,data.url)
            }else{
                alert_msg.error(data.msg);
                return false;
            }
        }
    });
    var config = {
        '.chosen-select': {},                    
    }
    for (var selector in config) {
        $(selector).chosen(config[selector]);
    }
</script>